package com.cskaoyan.bean.valid;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;

/**
 * @author stone
 * @date 2022/08/15 14:46
 */
@Data
public class User {
    @Length(min = 6)
    String username;
    @Length(min = 8)
    String password;//=ligenli

    @Min(18)
    @Max(value = 30, message = "valid 30")
    Integer age;
}
